package de.htw.saarland.ae;

import android.app.Activity;
import android.media.MediaPlayer;
import android.os.Bundle;
import android.os.SystemClock;
import android.view.Menu;
import android.view.View;

public class SnoozeActivity extends Activity {
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_snooze);
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_wecker, menu);
		return true;
	}

	@Override
	public void onResume() {
		super.onResume();
		alarmAbspielen();
	}

	public void onClick(View v) {
		switch (v.getId()) {
		case R.id.button_snooze:
			break;
		case R.id.button_abbrechen:
			break;
		}
	}

	private void alarmAbspielen() {
		MediaPlayer player = MediaPlayer.create(this, R.raw.cesium);
		player.setLooping(true);
		player.start();
		SystemClock.sleep(10000);
		player.stop();
	}

}
